<strong>Be careful when using this directive; for instance,
<code>"UserDir ./"</code> would map <code>"/~root"</code> to
<code>"/"</code> - which is probably undesirable. It is strongly
recommended that your configuration include a "<code>UserDir
disabled root</code>" declaration. See also the <code class="directive"><a href="../mod/core.html#directory">Directory</a></code> directive and the <a href="../misc/security_tips.html">Security Tips</a> page for
more information.</strong>
</div>
<p>Additional examples:</p>
<p>To allow a few users to have <code>UserDir</code> directories, but
not anyone else, use the following:</p>
<div class="example"><p><code>
UserDir disabled<br />
UserDir enabled user1 user2 user3
</code></p></div>
<p>To allow most users to have <code>UserDir</code> directories, but
deny this to a few, use the following:</p>
<div class="example"><p><code>
UserDir enabled<br />
UserDir disabled user4 user5 user6
</code></p></div>
<p>It is also possible to specify alternative user directories.
If you use a command like:</p>
<div class="example"><p><code>
Userdir public_html /usr/web http://www.foo.com/
</code></p></div>
<p>With a request for http://www.foo.com/~bob/one/two.html, will try to
find the page at ~bob/public_html/one/two.html first, then
/usr/web/bob/one/two.html, and finally it will send a redirect
to http://www.foo.com/bob/one/two.html.</p>
<p>If you add a redirect, it must be the last alternative in the list.
Apache cannot determine if the redirect succeeded or not, so if you have
the redirect earlier in the list, that will always be the alternative
that is used.</p>
<p>User directory substitution is not active by default in versions
2.1.4 and later. In earlier versions, <code>UserDir public_html</code>
was assumed if no <code class="directive"><a href="#userdir">UserDir</a></code>
<p><span>Available Languages: </span><a href="../en/mod/mod_userdir.html" title="English"> en </a> |
<a href="../ja/mod/mod_userdir.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
<a href="../ko/mod/mod_userdir.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
</div><div id="footer">
<p class="apache">Copyright 1995-2006 The Apache Software Foundation or its licensors, as applicable.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>